package com.design;


/**
 * 已支付
 */
public class AlreadyPayOrder implements OrderState{
    @Override
    public void pay(Order order) {
        System.out.println("已经支付的订单无需重新支付");
    }

    @Override
    public void cancel(Order order) {
        System.out.println("已支付状态的订单无法取消");
    }

    @Override
    public void ship(Order order) {
        System.out.println("订单已发货");
        order.setOrderState(new ShipOrder());
    }

    @Override
    public void receive(Order order) {
        System.out.println("已支付状态的订单无法收货，需要先发货");
    }

    @Override
    public String getStateName() {
        return "已支付";
    }
}
